package online.westonline.com.westonline.ui;

import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.widget.ImageView;
import android.widget.TextView;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import online.westonline.com.westonline.R;
import online.westonline.com.westonline.adapter.GaideAdpter;
import online.westonline.com.westonline.base.BaseActivity;
import online.westonline.com.westonline.entry.GaideBean;

public class GaideActivity extends BaseActivity {


    @BindView(R.id.tv_topbar_title)
    TextView tvTopbarTitle;
    @BindView(R.id.tv_topbar_title_center)
    TextView tvTopbarTitleCenter;
    @BindView(R.id.img_toolbar_menu)
    ImageView imgToolbarMenu;
    @BindView(R.id.tv_topbar_menu)
    TextView tvTopbarMenu;
    @BindView(R.id.toolbar)
    Toolbar toolbar;
    @BindView(R.id.recyclerView_gaide_list)
    RecyclerView recyclerViewGaideList;
    private GaideAdpter gaideAdpter;
    private List<GaideBean> gaideBeanList = new ArrayList<>();
    @Override
    protected void initview() {
        toolbar.setTitle("模板中心");
        setSupportActionBar(toolbar);
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        getSupportActionBar().setDisplayShowTitleEnabled(true);
        //初始化事件
        initsession();
        //初始化列表
        initrecycler();

    }

    /**
     * 初始化列表
     */
    private void initrecycler() {
        //模板1
        GaideBean gaideBean = new GaideBean();
        gaideBean.setDesc("省去重复填写的烦恼");
        gaideBean.setName("会议室申请模板");
        gaideBean.setId(0);
        gaideBean.setResid(R.drawable.ic_call_to_action_blue_500_36dp);
        gaideBeanList.add(gaideBean);
        gaideAdpter = new GaideAdpter();
        recyclerViewGaideList.setLayoutManager(new LinearLayoutManager(this));
        recyclerViewGaideList.setAdapter(gaideAdpter);
        gaideAdpter.setGaideBeans(gaideBeanList);
        gaideAdpter.notifyDataSetChanged();
    }

    /**
     * 初始化事件
     */
    private void initsession() {

    }

    @Override
    protected void initdata() {

    }

    @Override
    protected int setlayout() {
        return R.layout.activity_gaide;
    }


}
